"""app URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/2.2/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path
from . import views_pose
from . import views_animate
from . import views_material

from . import views_voicetone
from . import views_gallery
from . import views_record_tts
from . import views_record_video
from . import views_material_subtype
from . import views_goodscompose_save
from . import views_livebroadcast_save

urlpatterns = []
# 音色
urlpatterns += [
    path('voicetone/add', views_voicetone.VoiceToneViewSet.as_view({"post": "voicetone_add"}), name='voicetone_add'),
    path('voicetone/del', views_voicetone.VoiceToneViewSet.as_view({"post": "voicetone_del"}), name='voicetone_del'),
    path('voicetone/mod', views_voicetone.VoiceToneViewSet.as_view({"post": "voicetone_mod"}), name='voicetone_mod'),
    path('voicetone/one', views_voicetone.VoiceToneViewSet.as_view({"post": "voicetone_one"}), name='voicetone_one'),
    path('voicetone/list', views_voicetone.VoiceToneViewSet.as_view({"post": "voicetone_list"}), name='voicetone_list'),
]
# Gallery
urlpatterns += [
    # path('banner/add', views_banner.BannerViewSet.as_view({"post": "banner_add"}), name='banner_add'),
    # path('banner/del', views_banner.BannerViewSet.as_view({"post": "banner_del"}), name='banner_del'),
    # path('banner/mod', views_banner.BannerViewSet.as_view({"post": "banner_mod"}), name='banner_mod'),
    # path('banner/one', views_banner.BannerViewSet.as_view({"post": "banner_one"}), name='banner_one'),
    path('gallery/list', views_gallery.BannerViewSet.as_view({"post": "gallery_list"}), name='gallery_list'),
]
# 资源
urlpatterns += [
    path('material/add', views_material.MaterialViewSet.as_view({"post": "material_add"}), name='material_add'),
    path('material/del', views_material.MaterialViewSet.as_view({"post": "material_del"}), name='material_del'),
    path('material/mod', views_material.MaterialViewSet.as_view({"post": "material_mod"}), name='material_mod'),
    path('material/one', views_material.MaterialViewSet.as_view({"post": "material_one"}), name='material_one'),
    path('material/list', views_material.MaterialViewSet.as_view({"post": "material_list", "get": "material_list"}), name='material_list'),
]
# 资源子分类
urlpatterns += [
    path('material/subtype/add', views_material_subtype.MaterialSubtypeViewSet.as_view({"post": "material_subtype_add"}), name='material_subtype_add'),
    path('material/subtype/del', views_material_subtype.MaterialSubtypeViewSet.as_view({"post": "material_subtype_del"}), name='material_subtype_del'),
    path('material/subtype/mod', views_material_subtype.MaterialSubtypeViewSet.as_view({"post": "material_subtype_mod"}), name='material_subtype_mod'),
    path('material/subtype/one', views_material_subtype.MaterialSubtypeViewSet.as_view({"post": "material_subtype_one"}), name='material_subtype_one'),
    path('material/subtype/list', views_material_subtype.MaterialSubtypeViewSet.as_view({"post": "material_subtype_list"}), name='material_subtype_list'),
]
# tts音频
urlpatterns += [
    path('record/tts/add', views_record_tts.RecordTtsViewSet.as_view({"post": "record_tts_add"}), name='record_tts_add'),
    path('record/tts/del', views_record_tts.RecordTtsViewSet.as_view({"post": "record_tts_del"}), name='record_tts_del'),
    path('record/tts/mod', views_record_tts.RecordTtsViewSet.as_view({"post": "record_tts_mod"}), name='record_tts_mod'),
    path('record/tts/one', views_record_tts.RecordTtsViewSet.as_view({"post": "record_tts_one"}), name='record_tts_one'),
    path('record/tts/list', views_record_tts.RecordTtsViewSet.as_view({"post": "record_tts_list"}), name='record_tts_list'),
]

# ai视频
urlpatterns += [
    path('record/video/add', views_record_video.RecordVideoViewSet.as_view({"post": "record_video_add"}), name='record_video_add'),
    path('record/video/del', views_record_video.RecordVideoViewSet.as_view({"post": "record_video_del"}), name='record_video_del'),
    path('record/video/mod', views_record_video.RecordVideoViewSet.as_view({"post": "record_video_mod"}), name='record_video_mod'),
    path('record/video/one', views_record_video.RecordVideoViewSet.as_view({"post": "record_video_one"}), name='record_video_one'),
    path('record/video/list', views_record_video.RecordVideoViewSet.as_view({"post": "record_video_list"}), name='record_video_list'),
]


# 动作
urlpatterns += [
    path('pose/add',  views_pose.PoseViewSet.as_view({"post": "pose_add"}), name='pose_add'),
    path('pose/mod', views_pose.PoseViewSet.as_view({"post": "pose_mod"}), name='pose_mod'),
    path('pose/del', views_pose.PoseViewSet.as_view({"post": "pose_del"}), name='pose_del'),
    path('pose/list', views_pose.PoseViewSet.as_view({"post": "pose_list"}), name='pose_list'),
]
# 动画
urlpatterns += [
    path('animate/add',  views_animate.AnimateViewSet.as_view({"post": "animate_add"}), name='animate_add'),
    path('animate/mod', views_animate.AnimateViewSet.as_view({"post": "animate_mod"}), name='animate_mod'),
    path('animate/del', views_animate.AnimateViewSet.as_view({"post": "animate_del"}), name='animate_del'),
    path('animate/list', views_animate.AnimateViewSet.as_view({"post": "animate_list"}), name='animate_list'),
]

# # tts
# urlpatterns += [
#     path('tts/edgetts',  views_tts.EdgettsViewSet.as_view({"post": "edge_tts_txt2audio"}), name='edge_tts_txt2audio'),
#     path('tts/baidutts',  views_tts.EdgettsViewSet.as_view({"post": "baidu_tts_txt2audio"}), name='baidu_tts_txt2audio'),
# ]
#
# # pic_gen_video 转发
# urlpatterns += [
#     path('ai/pic_gen_video',  views_ai.PicGenVideoViewSet.as_view({"post": "pic_gen_video"}), name='pic_gen_video'),
#     path('taskresult/one',    views_ai.TaskResultViewSet.as_view({"post": "taskresult_one"}), name='taskresult_one'),
# ]

# 编辑区存档
urlpatterns += [
    path('goodscompose/add', views_goodscompose_save.GoodsComposeSaveViewSet.as_view({"post": "goodscomposesave_add"}), name='goodscomposesave_add'),
    path('goodscompose/del', views_goodscompose_save.GoodsComposeSaveViewSet.as_view({"post": "goodscomposesave_del"}), name='goodscomposesave_del'),
    path('goodscompose/mod', views_goodscompose_save.GoodsComposeSaveViewSet.as_view({"post": "goodscomposesave_mod"}), name='goodscomposesave_mod'),
    path('goodscompose/one', views_goodscompose_save.GoodsComposeSaveViewSet.as_view({"post": "goodscomposesave_one"}), name='goodscomposesave_one'),
    path('goodscompose/list', views_goodscompose_save.GoodsComposeSaveViewSet.as_view({"post": "goodscomposesave_list"}), name='goodscomposesave_list'),
]

# ai视频
urlpatterns += [
    path('livebroadcast/add', views_livebroadcast_save.LiveBroadcastSaveViewSet.as_view({"post": "livebroadcastsave_add"}), name='livebroadcastsave_add'),
    path('livebroadcast/del', views_livebroadcast_save.LiveBroadcastSaveViewSet.as_view({"post": "livebroadcastsave_del"}), name='livebroadcastsave_del'),
    path('livebroadcast/mod', views_livebroadcast_save.LiveBroadcastSaveViewSet.as_view({"post": "livebroadcastsave_mod"}), name='livebroadcastsave_mod'),
    path('livebroadcast/one', views_livebroadcast_save.LiveBroadcastSaveViewSet.as_view({"post": "livebroadcastsave_one"}), name='livebroadcastsave_one'),
    path('livebroadcast/list', views_livebroadcast_save.LiveBroadcastSaveViewSet.as_view({"post": "livebroadcastsave_list"}), name='livebroadcastsave_list'),
]

